.class Lcom/jecelyin/editor/v2/ui/c$a;
.super Ljava/lang/Object;
.source "EditorObjectProcessor.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/jecelyin/editor/v2/ui/c;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "a"
.end annotation


# instance fields
.field private final a:Lcom/jecelyin/editor/v2/ui/b;

.field b:Lcom/jecelyin/editor/v2/utils/ExtGrep;


# direct methods
.method public constructor <init>(Landroid/os/Parcelable;Lcom/jecelyin/editor/v2/ui/b;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    check-cast p1, Lcom/jecelyin/editor/v2/utils/ExtGrep;

    iput-object p1, p0, Lcom/jecelyin/editor/v2/ui/c$a;->b:Lcom/jecelyin/editor/v2/utils/ExtGrep;

    .line 3
    iput-object p2, p0, Lcom/jecelyin/editor/v2/ui/c$a;->a:Lcom/jecelyin/editor/v2/ui/b;

    .line 4
    invoke-direct {p0}, Lcom/jecelyin/editor/v2/ui/c$a;->a()V

    return-void
.end method

.method private a()V
    .locals 4

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/c$a;->a:Lcom/jecelyin/editor/v2/ui/b;

    iget-object v1, v0, Lcom/jecelyin/editor/v2/ui/b;->b:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    invoke-virtual {v0}, Lcom/jecelyin/editor/v2/ui/b;->b()Landroid/content/Context;

    move-result-object v0

    sget v2, Lcom/jecelyin/editor/v2/m;->je_searching:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    iget-object v2, p0, Lcom/jecelyin/editor/v2/ui/c$a;->b:Lcom/jecelyin/editor/v2/utils/ExtGrep;

    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/utils/ExtGrep;->a()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v0, v2, v3}, Lcom/jecelyin/editor/v2/widget/text/EditAreaView;->a(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V

    .line 3
    iget-object v0, p0, Lcom/jecelyin/editor/v2/ui/c$a;->b:Lcom/jecelyin/editor/v2/utils/ExtGrep;

    new-instance v1, Lcom/jecelyin/editor/v2/ui/c$a$a;

    invoke-direct {v1, p0}, Lcom/jecelyin/editor/v2/ui/c$a$a;-><init>(Lcom/jecelyin/editor/v2/ui/c$a;)V

    invoke-virtual {v0, v1}, Lcom/jecelyin/editor/v2/utils/ExtGrep;->a(Les/af0;)V

    return-void
.end method

.method static synthetic a(Lcom/jecelyin/editor/v2/ui/c$a;Ljava/util/List;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/jecelyin/editor/v2/ui/c$a;->a(Ljava/util/List;)V

    return-void
.end method

.method private a(Ljava/util/List;)V
    .locals 11
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/jecelyin/editor/v2/utils/ExtGrep$c;",
            ">;)V"
        }
    .end annotation

    .line 4
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    .line 5
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 6
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    const/4 v2, 0x0

    move-object v3, v2

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_2

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;

    const-string v5, "\n"

    if-eqz v3, :cond_0

    .line 7
    iget-object v6, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->a:Ljava/io/File;

    invoke-virtual {v6, v3}, Ljava/io/File;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_1

    .line 8
    :cond_0
    iget-object v3, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->a:Ljava/io/File;

    .line 9
    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v6, "[PATH]"

    .line 10
    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 11
    invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v6, "[/PATH]"

    .line 12
    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 13
    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 14
    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 15
    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 16
    :cond_1
    iget v6, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->e:I

    .line 17
    iget v7, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->f:I

    const/4 v8, 0x1

    new-array v8, v8, [Ljava/lang/Object;

    .line 18
    iget v9, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->c:I

    invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v9

    const/4 v10, 0x0

    aput-object v9, v8, v10

    const-string v9, "%1$4d\t"

    invoke-static {v9, v8}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v0, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v8, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->b:Ljava/lang/String;

    .line 19
    invoke-virtual {v8, v10, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v0, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v8, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->b:Ljava/lang/String;

    .line 20
    invoke-virtual {v8, v6, v7}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v6, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->b:Ljava/lang/String;

    .line 21
    invoke-virtual {v6, v7}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 22
    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 23
    new-instance v5, Ljava/util/HashMap;

    invoke-direct {v5}, Ljava/util/HashMap;-><init>()V

    .line 24
    invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

    const-string v7, "file"

    invoke-virtual {v5, v7, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 25
    iget v6, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->c:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    const-string v7, "line"

    invoke-virtual {v5, v7, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 26
    iget v4, v4, Lcom/jecelyin/editor/v2/utils/ExtGrep$c;->d:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    const-string v6, "column"

    invoke-virtual {v5, v6, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 27
    invoke-interface {v1, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 28
    :cond_2
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I

    move-result p1

    if-nez p1, :cond_3

    .line 29
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/c$a;->a:Lcom/jecelyin/editor/v2/ui/b;

    invoke-virtual {p1}, Lcom/jecelyin/editor/v2/ui/b;->b()Landroid/content/Context;

    move-result-object p1

    sget v2, Lcom/jecelyin/editor/v2/m;->je_find_not_found:I

    invoke-virtual {p1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 30
    :cond_3
    iget-object p1, p0, Lcom/jecelyin/editor/v2/ui/c$a;->a:Lcom/jecelyin/editor/v2/ui/b;

    iget-object p1, p1, Lcom/jecelyin/editor/v2/ui/b;->b:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v2, p0, Lcom/jecelyin/editor/v2/ui/c$a;->b:Lcom/jecelyin/editor/v2/utils/ExtGrep;

    invoke-virtual {v2}, Lcom/jecelyin/editor/v2/utils/ExtGrep;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v0, v2, v1}, Lcom/jecelyin/editor/v2/widget/text/EditAreaView;->a(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V

    return-void
.end method
